//Town dialog script//
////Town 3: Beneath Keilan//

begintalkscript;
variables;
int = c,change,i,j,k,l,m,n,splvl;
string = gold_str,spell;
begintalknode 1;
	state = -1;
	personality = 1;
	nextstate = 1;
	condition = 1;
	question = "Kryll";
	text1 = "A small man sits across the counter; his face is obscured by the cowl of his robe. As you approach, he looks up from the ledgers he was shuffling, and you get your first good look at him.";
	text2 = "The man's complexion has a sickly greenish tint. His beady black eyes are so small, they are almost covered by the many wrinkles of his face. A few wisps of thin black hair fall across his twisted face, but your eyes are drawn to his mouth.";
	text3 = "Black lips part to reveal pointy teath; he begins to speak, _I am Kryll. What would you adventurers have from the Onyx Bank of Pralgad?_";
	action = intro;
	text5 = "Kryll looks up from his papers when you approach. _What will it be, noble adventurers?_";

begintalknode 2;
	state = 1;
	personality = 1;
	nextstate = 2;
	condition = 1;
	question = "What exactly are you?";
	text1 = "Kryll chuckles, _I have the misfortune of being a half-goblin. My mother was human, my father goblin. The details of how this happened are fairly unsavory, so I will spare you from them._";
	text2 = "_It was unfortunate, but at least I seem to have inherited the greed of my father's people rather than their lust for blood. So here I sit before you, probably the only goblin citizen of the Empire._";

begintalknode 3;
	state = 2;
	personality = 1;
	nextstate = 1;
	condition = 1;
	question = "So how did you wind up as a banker?";
	text1 = "_Well as I said, I have a goblins greed but unfortunately I also have a goblin's good looks._";
	text2 = "_All my life people have avoided me because of my appearance and my race. The Onyx Bank doesn't care what its employees look like, and I figured banking is one profession where my looks would actually help me fit in._";
	text3 = "Kryll cackles at his own joke. He seems good natured for a half-goblin.";

begintalknode 4;
	state = 1;
	personality = 1;
	nextstate = 3;
	condition = 1;
	question = "What is the Onyx Bank of Pralgad?";
	text1 = "Kryll looks suprised. _I am surprised that adventurers wouldn't know about the Onyx Bank. We have chapters all across Aizo, allowing you to store your gold and also safely transport it._";
	text2 = "_You can either deposit your gold, withdraw gold, or receive a certificate of deposit. A certificate can be cashed at other bank chapters, and is also often accepted by local merchants._";

begintalknode 5;
	state = 3;
	personality = 1;
	nextstate = -1;
	condition = 1;
	question = "I'd like to make a deposit";
code =
	set_flag(3,5,0);
	set_flag(3,6,0);
	set_flag(3,7,0);
	set_flag(3,8,0);
	set_flag(3,9,0); 
	get_text_response("Ten thousands?");
		check_text_response_match("0");
		if(got_text_match())
		set_flag(3,5,0);	

		check_text_response_match("1");
		if(got_text_match())
		set_flag(3,5,1);
		
		check_text_response_match("2");
		if(got_text_match())
		set_flag(3,5,2);

		check_text_response_match("3");
		if(got_text_match())
		set_flag(3,5,3);

		check_text_response_match("4");
		if(got_text_match())
		set_flag(3,5,4);

		check_text_response_match("5");
		if(got_text_match())
		set_flag(3,5,5);

		check_text_response_match("6");
		if(got_text_match())
		set_flag(3,5,6);

		check_text_response_match("7");
		if(got_text_match())
		set_flag(3,5,7);

		check_text_response_match("8");
		if(got_text_match())
		set_flag(3,5,8);

		check_text_response_match("9");
		if(got_text_match())
		set_flag(3,5,9);
	get_text_response("Thousands?");
		check_text_response_match("0");
		if(got_text_match())
		set_flag(3,6,0);	

		check_text_response_match("1");
		if(got_text_match())
		set_flag(3,6,1);
		
		check_text_response_match("2");
		if(got_text_match())
		set_flag(3,6,2);

		check_text_response_match("3");
		if(got_text_match())
		set_flag(3,6,3);

		check_text_response_match("4");
		if(got_text_match())
		set_flag(3,6,4);

		check_text_response_match("5");
		if(got_text_match())
		set_flag(3,6,5);

		check_text_response_match("6");
		if(got_text_match())
		set_flag(3,6,6);

		check_text_response_match("7");
		if(got_text_match())
		set_flag(3,6,7);

		check_text_response_match("8");
		if(got_text_match())
		set_flag(3,6,8);

		check_text_response_match("9");
		if(got_text_match())
		set_flag(3,6,9);
	get_text_response("Hundreds?");
		check_text_response_match("0");
		if(got_text_match())
		set_flag(3,7,0);	

		check_text_response_match("1");
		if(got_text_match())
		set_flag(3,7,1);
		
		check_text_response_match("2");
		if(got_text_match())
		set_flag(3,7,2);

		check_text_response_match("3");
		if(got_text_match())
		set_flag(3,7,3);

		check_text_response_match("4");
		if(got_text_match())
		set_flag(3,7,4);

		check_text_response_match("5");
		if(got_text_match())
		set_flag(3,7,5);

		check_text_response_match("6");
		if(got_text_match())
		set_flag(3,7,6);

		check_text_response_match("7");
		if(got_text_match())
		set_flag(3,7,7);

		check_text_response_match("8");
		if(got_text_match())
		set_flag(3,7,8);

		check_text_response_match("9");
		if(got_text_match())
		set_flag(3,7,9);
	get_text_response("Tens?");
		check_text_response_match("0");
		if(got_text_match())
		set_flag(3,8,0);	

		check_text_response_match("1");
		if(got_text_match())
		set_flag(3,8,1);
		
		check_text_response_match("2");
		if(got_text_match())
		set_flag(3,8,2);

		check_text_response_match("3");
		if(got_text_match())
		set_flag(3,8,3);

		check_text_response_match("4");
		if(got_text_match())
		set_flag(3,8,4);

		check_text_response_match("5");
		if(got_text_match())
		set_flag(3,8,5);

		check_text_response_match("6");
		if(got_text_match())
		set_flag(3,8,6);

		check_text_response_match("7");
		if(got_text_match())
		set_flag(3,8,7);

		check_text_response_match("8");
		if(got_text_match())
		set_flag(3,8,8);

		check_text_response_match("9");
		if(got_text_match())
		set_flag(3,8,9);
	get_text_response("Ones?");
		check_text_response_match("0");
		if(got_text_match())
		set_flag(3,9,0);	

		check_text_response_match("1");
		if(got_text_match())
		set_flag(3,9,1);
		
		check_text_response_match("2");
		if(got_text_match())
		set_flag(3,9,2);

		check_text_response_match("3");
		if(got_text_match())
		set_flag(3,9,3);

		check_text_response_match("4");
		if(got_text_match())
		set_flag(3,9,4);

		check_text_response_match("5");
		if(got_text_match())
		set_flag(3,9,5);

		check_text_response_match("6");
		if(got_text_match())
		set_flag(3,9,6);

		check_text_response_match("7");
		if(got_text_match())
		set_flag(3,9,7);

		check_text_response_match("8");
		if(got_text_match())
		set_flag(3,9,8);

		check_text_response_match("9");
		if(got_text_match())
		set_flag(3,9,9);
	j = ((get_flag(3,5)) * 10000);
	k = ((get_flag(3,6)) * 1000);
	l = ((get_flag(3,7)) * 100);
	m = ((get_flag(3,8)) * 10);
	n = (get_flag(3,9));
	i = (j + k + l + m + n);
	if(i <= coins_amount()) {
	inc_flag(3,10,(i / 255));
	if((255 - get_flag(3,11)) < (i % 255))
	{	inc_flag(3,10,1);
		change = ((i % 255) - (255 - get_flag(3,11)));
		set_flag(3,11,change); }
	else set_flag(3,11,(i % 255));
	pay_coins(i);
	message_dialog("Kryll weighs your gold and jots a number down in his ledger. Then a guard comes and carries it away to a vault.","");
}
	else message_dialog("You don't have that much gold.","");
break;

begintalknode 6;
	state = 3;
	personality = 1;
	condition = 1;
	nextstate = -1;
	question = "I would like to make a withdrawl.";
	code = 
	set_flag(3,5,0);
	set_flag(3,6,0);
	set_flag(3,7,0);
	set_flag(3,8,0);
	set_flag(3,9,0); 
	get_text_response("Ten thousands?");
		check_text_response_match("0");
		if(got_text_match())
		set_flag(3,5,0);	

		check_text_response_match("1");
		if(got_text_match())
		set_flag(3,5,1);
		
		check_text_response_match("2");
		if(got_text_match())
		set_flag(3,5,2);

		check_text_response_match("3");
		if(got_text_match())
		set_flag(3,5,3);

		check_text_response_match("4");
		if(got_text_match())
		set_flag(3,5,4);

		check_text_response_match("5");
		if(got_text_match())
		set_flag(3,5,5);

		check_text_response_match("6");
		if(got_text_match())
		set_flag(3,5,6);

		check_text_response_match("7");
		if(got_text_match())
		set_flag(3,5,7);

		check_text_response_match("8");
		if(got_text_match())
		set_flag(3,5,8);

		check_text_response_match("9");
		if(got_text_match())
		set_flag(3,5,9);
	get_text_response("Thousands?");
		check_text_response_match("0");
		if(got_text_match())
		set_flag(3,6,0);	

		check_text_response_match("1");
		if(got_text_match())
		set_flag(3,6,1);
		
		check_text_response_match("2");
		if(got_text_match())
		set_flag(3,6,2);

		check_text_response_match("3");
		if(got_text_match())
		set_flag(3,6,3);

		check_text_response_match("4");
		if(got_text_match())
		set_flag(3,6,4);

		check_text_response_match("5");
		if(got_text_match())
		set_flag(3,6,5);

		check_text_response_match("6");
		if(got_text_match())
		set_flag(3,6,6);

		check_text_response_match("7");
		if(got_text_match())
		set_flag(3,6,7);

		check_text_response_match("8");
		if(got_text_match())
		set_flag(3,6,8);

		check_text_response_match("9");
		if(got_text_match())
		set_flag(3,6,9);
	get_text_response("Hundreds?");
		check_text_response_match("0");
		if(got_text_match())
		set_flag(3,7,0);	

		check_text_response_match("1");
		if(got_text_match())
		set_flag(3,7,1);
		
		check_text_response_match("2");
		if(got_text_match())
		set_flag(3,7,2);

		check_text_response_match("3");
		if(got_text_match())
		set_flag(3,7,3);

		check_text_response_match("4");
		if(got_text_match())
		set_flag(3,7,4);

		check_text_response_match("5");
		if(got_text_match())
		set_flag(3,7,5);

		check_text_response_match("6");
		if(got_text_match())
		set_flag(3,7,6);

		check_text_response_match("7");
		if(got_text_match())
		set_flag(3,7,7);

		check_text_response_match("8");
		if(got_text_match())
		set_flag(3,7,8);

		check_text_response_match("9");
		if(got_text_match())
		set_flag(3,7,9);
	get_text_response("Tens?");
		check_text_response_match("0");
		if(got_text_match())
		set_flag(3,8,0);	

		check_text_response_match("1");
		if(got_text_match())
		set_flag(3,8,1);
		
		check_text_response_match("2");
		if(got_text_match())
		set_flag(3,8,2);

		check_text_response_match("3");
		if(got_text_match())
		set_flag(3,8,3);

		check_text_response_match("4");
		if(got_text_match())
		set_flag(3,8,4);

		check_text_response_match("5");
		if(got_text_match())
		set_flag(3,8,5);

		check_text_response_match("6");
		if(got_text_match())
		set_flag(3,8,6);

		check_text_response_match("7");
		if(got_text_match())
		set_flag(3,8,7);

		check_text_response_match("8");
		if(got_text_match())
		set_flag(3,8,8);

		check_text_response_match("9");
		if(got_text_match())
		set_flag(3,8,9);
	get_text_response("Ones?");
		check_text_response_match("0");
		if(got_text_match())
		set_flag(3,9,0);	

		check_text_response_match("1");
		if(got_text_match())
		set_flag(3,9,1);
		
		check_text_response_match("2");
		if(got_text_match())
		set_flag(3,9,2);

		check_text_response_match("3");
		if(got_text_match())
		set_flag(3,9,3);

		check_text_response_match("4");
		if(got_text_match())
		set_flag(3,9,4);

		check_text_response_match("5");
		if(got_text_match())
		set_flag(3,9,5);

		check_text_response_match("6");
		if(got_text_match())
		set_flag(3,9,6);

		check_text_response_match("7");
		if(got_text_match())
		set_flag(3,9,7);

		check_text_response_match("8");
		if(got_text_match())
		set_flag(3,9,8);

		check_text_response_match("9");
		if(got_text_match())
		set_flag(3,9,9);
	j = ((get_flag(3,5)) * 10000);
	k = ((get_flag(3,6)) * 1000);
	l = ((get_flag(3,7)) * 100);
	m = ((get_flag(3,8)) * 10);
	n = (get_flag(3,9));
	i = ((j) + (k) + (l) + (m) + (n));
	if(i <= ((get_flag(3,10) * 255) + get_flag(3,11))) {
		if(i <= (30000 - coins_amount())) {
	inc_flag(3,10,(-1) * (i / 255));
	if((i % 255) > get_flag(3,11))
	{	inc_flag(3,10,(-1));
		change = (255 + get_flag(3,11) - (i % 255));
		set_flag(3,11,change); }
	else	inc_flag(3,11,(-1) * (i % 255)); 
	change_coins((i));
	message_dialog("Kryll calls for a guard, who brings out your gold. You have to sign several papers verifying that you have indeed withdrawn it. You do so, and pocket your hard earned money.","");
}
	else {
	c = coins_amount();
	change_coins(30000 - (c));
	inc_flag(3,10,((-1) * ((30000 - (c)) / 255)));
	inc_flag(3,10,((-1) * ((30000 - (c)) - (get_flag(3,10) * 255))));
	message_dialog("Kryll calls for a guard, who brings out your gold. _You can't carry that much, but here is as much as you can.","");
}
}
	else message_dialog("You don't have that much gold in the bank. Come back after you've deposited some more.","");
break;

begintalknode 7;
	state = 3;
	personality = 1;
	condition = 1;
	nextstate = -1;
	question = "How much gold do I have in the bank?";
	code =
	clear_buffer();
	append_string("You currently have ");
	append_number((get_flag(3,10) * 255) + (get_flag(3,11)));
	append_string(" gold in the bank.");
	get_buffer_text(gold_str);
	message_dialog(gold_str,"");
break;

begintalknode 8;
	state = 3;
	personality = 1;
	condition = 1;
	nextstate = -1;
	question = "Can I have a certificate of deposit?";
	code =
	if(((get_flag(3,10) * 255) + (get_flag(3,11))) >= 15000) {
		reward_give(452);
		message_dialog("Kryll pulls out a sheet of parchment, writes an amount of gold on it, signs it, and then pulls out a large gold seal and stamps it. _This can be redeemed at any Onyx Bank. Merchants will often accept it as currency._","");
	inc_flag(3,10,-58);
		if(get_flag(3,11) < 210) {
			inc_flag(3,10,-1);
			set_flag(3,11,-(210 - (get_flag(3,11)))); }
			inc_flag(3,11,-210); }
	else message_dialog("Kryll consults his accounts, then looks up at you. _We only give certificates of deposit to our biggest accounts, if your account reaches 15000 gold then I can give you one._","");
break;
begintalknode 9;
	state = 3;
	personality = 1;
	condition = 1;
	nextstate = -1;
	question = "I would like to redeem one of my certificates.";
	text1 = "_Nice doing business with you_";
	code =
	if(has_item(452) == 1) {
	inc_flag(3,10,58);
		if(get_flag(3,11) <= 45)
			inc_flag(3,11,210);
	else {
		inc_flag(3,10,1);
		set_flag(3,11,(210-(get_flag(3,11)))); }
	message_dialog("Kryll examines the certificate closely. When he is finally satisfied that it is authentic, he looks up. _The gold will be placed in your account. Thank you for your business._","");
	take_item(452);
		}
	else message_dialog("You don't have any certificates to redeem.","");
break;

begintalknode 10;
	state = 1;
	nextstate = -1;
	personality = 1;
	condition = 1;
	question = "What do you think about Keilan's problems?";
	text1 = "_The Bank is fairly removed from city life above ground, so I haven't heard much about these machines ravaging the surface. I suppose that if they do come and destroy the city it won't be good for business, so good luck with your quest to stop them._";

begintalknode 32;
	state = 3;
	nextstate = -1;
	personality = 1;
	condition = 1;
	question = "I don't need anything right now.";
	text1 = "_Very well, please come again soon._";

begintalknode 11;
	state = -1;
	nextstate = 5;
	condition = 5;
	personality = 2;
	question = "Journeyman";
	text1 = "One of the older students sits at the table by himself. Unlike most of the other students here who seem to preoccupied with studies to speak with you, this student motions you over. You sit opposite him.";
	text2 = "_How's life treating you? I'm Journeyman Leon._ You ask him why he wanted to speak with you. _Who doesn't want to talk with adventurers? Always interesting folk. Perhaps we could swap knowledge._ He sounds phoney.";
	text3 = "After checking around the room for any listeners, he leans forward and says in hushed tones, _I have something that might really interest you. Ask me if you want to know more._";
	text4 = "_You scumbags got some nerve comin' back here. You better go before you get hurt._ Certainly cocky for a journeyman.";
	text5 = "_I don't have anything for you, and no, I don't want to talk about your personal life._ Real charming when he already has your money.";
	code = 
	if(get_flag(1,4) == 1) {
		clear_strings();
		add_string(4);
		end(); }
	else {
		remove_string(4);
		remove_string(5); }
	if(get_flag(1,5) == 1) 
	{	clear_strings();
		add_string(5); }
break;


begintalknode 12;
	state = 5;
	nextstate = 6;
	condition = ((get_flag(1,5) == 0) && get_flag(1,4) == 0);
	personality = 2;
	question = "What's school like here?";
	text1 = "He seems frustrated that you aren't asking him a serious question. _It's a waste of my time. The Academy drains money from my family, or at least it used to drain money from my family. Now it drains money from me, a drastic improvement._";
	text2 = "Clearly he doesn't want to talk about it much.";

begintalknode 13;
	state = 6;
	nextstate = 7;
	condition = 1;
	personality = 2;
	question = "So you pay for your own schooling, eh?";
	text1 = "_Yes, I do. Look, don't you have anything you want to ask me about--like, say, contraband spell books that would greatly benefit a group of adventurers?_";

begintalknode 14;
	state = 7;
	nextstate = 5;
	condition = 1;
	personality = 2;
	question = "Why yes, I would.";
	text1 = "_It's about time, ask away._ He mutters something about adventurers being dense as bricks, and as perceptive as blind beggars.";

begintalknode 15;
	state = 7;
	nextstate = -1;
	condition = 1;
	personality = 2;
	question = "I'm not really interested in contraband.";
	action = END_TALK;
	text1 = "_Then what are you wasting my time for? Get the hell out of here, bunch of idiots!_";

begintalknode 16;
	state = 7;
	nextstate = -1;
	condition = 1;
	personality = 2;
	question = "I was actually wondering how your mother was doing.";
	action = END_TALK;
	text1 = "_My mother, what the hell are you talking about? Do you think this is funny?_ He fumes for several minutes; you ask him how his grades are doing, at which point he explodes.";
	text2 = "_Get out of my sight. If you don't want the damn spellbook, just say so, quit yanking me around._ Pretty amusing.";

begintalknode 17;
	state = 5;
	nextstate = 8;
	personality = 2;
	condition = ((get_flag(1,5) == 0) && get_flag(1,4) == 0);
	question = "What do you have for us, then?";
	text1 = "_The spellbooks here are pretty mundane, apprentice stuff, you know. But in the basement there are some good things, written by some real dark men that studied or worked here. Naturally such dangerous tomes are kept under lock._";
	text2 = "He smiles mischieviously. _I just happened to stumble on this fine example of a Lightning Spray book in the student library. Wonder how that got there? Anyway, if you want to take a peak, it'll cost you 5000 coins._";

begintalknode 18;
	state = 8;
	nextstate = -1;
	personality = 2;
	condition = 1;
	question = "Here's your 5000 gold. This better be good.";
	action = END_TALK;
	text1 = "Leon takes your money and hands you the spellbook. You read it over and learn Lightning Spray better than before.";
	text2 = "He counts your money. _What are you trying to pull here? Come back when you have enough._";
code = 
	if (coins_amount() >= 5000) {
		remove_string(2);
		change_coins(-5000);
		i = 0;
		while (i < 4)
		{	splvl = 0;
			while(splvl <= 3)
			{	if(get_spell_level(i,0,10) < 7)
					change_spell_level(i,0,10,1);
				if(get_spell_level(i,0,10) >= 7)
				{	clear_buffer();
					append_char_name(i);
					append_string(" already knows Lightning Spray at this level");
					get_buffer_text(spell);
					print_str(spell); }
				splvl = splvl + 1; }
			i = i + 1; }
		set_flag(1,5,1);
}
	else
		remove_string(1);
break;

begintalknode 19;
	state = 8;
	nextstate = -1;
	personality = 2;
	condition = 1;
	action = END_TALK;
	question = "I'm not interested.";
	text1 = "_Then get out of here, but know that your missing out._";

begintalknode 20;
	state = 8;
	nextstate = -1;
	personality = 2;
	condition = 1;
	question = "How about I just turn you in, Tuchin won't be happy.";
	text1 = "He looks at you angrily, then the book vanishes up one of his sleaves. _Trying to blackmail me, huh? Yeah, good luck proving I ever had it._";
	action = END_TALK;
	code =
	set_flag(1,4,1);
break;

begintalknode 21;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "Apprentice";
	text1 = "The apprentices here at the Academy are worked hard. Every one you've seen so far has their noses in a book, and this one is no different.";
	text2 = "You approach to talk, but don't get any responses. Lots of tests, apparently.";
	text3 = "The apprentice looks up from his studies to smile at you. _I heard what you did, and am very grateful. At least one weight is lifted from my back._ With that short praise he returns to his book.";
	code =
	if(get_flag(250,7) == 0)
		remove_string(3);
	if(get_flag(250,7) == 1)
	{	remove_string(1);
		remove_string(2);
}
break;

begintalknode 22;
	state = -1;
	nextstate = 10;
	personality = 3;
	question = "Edmund";
	text1 = "A young man lies drunk on the floor. You thought at first that he was passed out, but when you poke him with your foot he leaps up. Staggers up is actually a more accurate term.";
	text2 = "_Whosh there? I don't know you folk, who are you and why are you buggin' me?_";

begintalknode 23;
	state = 10;
	nextstate = -1;
	personality = 3;
	question = "Who are you?";
	text1 = "_I'm Edmund, whose askin'?_ You introduce yourself. _I'd say it's a pleasure to meet you, but it really isn't. I'd much prefer that you just leave._ With that he lies back down.";
	action = end_talk;

begintalknode 24;
	state = 10;
	nextstate = 11;
	condition = (get_flag(0,19) == 1);
	personality = 3;
	question = "Your parents don't seem happy about your drinking.";
	text1 = "_That sounds like something they'd say. I ain't workin' in no stinkin' tavern. I got better things to do._ He frowns at you. _You better not be here to reprimand me._";

begintalknode 25;
	state = 11;
	nextstate = -1;
	personality = 3;
	condition = (get_flag(1,6) == 0);
	question = "Well, you could help out some more.";
	text1 = "_Well, you could stop butting in to other people's affair but I don't see that happening in the near future._";
	text2 = "_Look buddy you better make like a tree and get out of here. I'll drop you so fast you won't know what hit you._ He shakes his fist to add emphasis, and almost falls over for his efforts.";
	action = END_TALK;
	code = 
	set_flag(1,6,1);
break;

begintalknode 26;
	state = 11;
	nextstate = -1;
	personality = 3;
	condition = (get_flag(1,6) == 0);
	question = "No, do what you want.";
	text1 = "_Yer damn right._ With that he collapses.";
	action = END_TALK;
	code = 
	set_flag(1,6,1);
break;

begintalknode 27;
	state = 10;
	nextstate = -1;
	personality = 3;
	condition = (get_flag(250,7) == 1);
	question = "You know we defeated the golems.";
	text1 = "_Look buddy, I don't know what the hell you're talking about. Golems are the least of your problems; you're about to get the whoopin' of your lifetime._ He takes an awkward swing at you and almost collapses.";
	text2 = "You catch him and set him down on the floor. This conversation is going nowhere."; 

begintalknode 28;
	state = -1;
	nextstate = 12;
	personality = 4;
	condition = 1;
	question = "Professor Aeron";
	text1 = "A man wearing the robes of a professor of the Academy roams the library, scanning the shelves and occasionally taking down a book that meets some unknown criteria.";
	text2 = "He looks up as you approach. _Hello, I'm Professor Aeron. Is there anything I could do to assist you?_";
	text3 = "_I have heard what you did for us, thank you so much. Now I can finally rest easy._";
	code =
	if(get_flag(250,7) > 0)
	{	clear_strings();
		add_string(3); }
	else remove_string(3);
break;

begintalknode 29;
	state = 12;
	nextstate = 13;
	personality = 4;
	condition = 1;
	question = "What are you reading about?";
	text1 = "_I've been researching potential ways to fight the golems. It's an around the clock job; I haven't gotten a good night's rest in recent memory. However, we have made some very interesting advances and discoveries._";
	text2 = "_Well, I don't have to worry about researching the golems anymore, thanks to you. Now I'm going to take up my old pastime again: researching the magical properties of gremlin saliva._";
	code =
	if(get_flag(250,7) == 0)
		remove_string(2);
	else remove_string(1);
break;

begintalknode 30;
	state = 13;
	nextstate = -1;
	condition = (get_flag(250,7) == 0);
	personality = 4;
	question = "What have you discovered?";
	text1 = "_Oh, various ways to disrupt the magic holding them together, as well as battle strategies employed by General Baziron during the golem plague of Gale._";
	text2 = "_It's all very interesting, but we don't have enough personnel to hold the golems off, regardless of the tactics or weapons we use._";

begintalknode 31;
	state = 12;
	nextstate = -1;
	condition = 1;
	personality = 4;
	question = "Can you teach us any spells?";
	text1 = "You finish shopping.";
	code =
	begin_shop_mode("Aeron's Spells","'I don't have much time to spare, but I suppose that you lot are our only hope. Arm yourselves so you might stand up to the golems.'",10,3,-1);
break;

begintalknode 32;
	state = 12;
	nextstate = -1;
	condition = ((get_flag(250,8) > 0) && (get_flag(250,7) == 0));
	personality = 4;
	question = "Have you ever heard of a man named Janok? He lived here 30 years ago.";
	text1 = "_Yes I do remember him. I was a new teacher in the Academy, and he was in one of my alchemy classes. It was pretty traumatic having one of my first students as a murder suspect._";
	text2 = "_He was a very adept student, very talented at magic. However, he seemed to spend all of class day dreaming. I thought he was a very strange young man, and even stranger once he committed murder._";
